import cn.disignPattern.com.partOne.Duck;
import cn.disignPattern.com.partOne.FlyRocketPowered;
import cn.disignPattern.com.partOne.MallardDuck;
import cn.disignPattern.com.partOne.ModelDuck;

public class Main {

    public static void main(String[] args) {
        partOne2();
    }

    public static void partOne1(){
        MallardDuck mallardDuck = new MallardDuck();
        mallardDuck.performFly();
        mallardDuck.performQuack();
        mallardDuck.display();
    }

    public static void partOne2(){
        Duck duck = new ModelDuck();
        duck.performFly();
        duck.setFlyBehavior(new FlyRocketPowered());
        duck.performFly();
        duck.performQuack();
        duck.display();
    }
}
